<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
    <base href="<%=basePath%>">
	<link rel="stylesheet" type="text/css" href="bootstrap-rs/themes/black/easyui.css">
	<link rel="stylesheet" type="text/css" href="bootstrap-rs/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="bootstrap-rs/demo.css">
	<script type="text/javascript" src="bootstrap-rs/jquery.min.js"></script>
	<script type="text/javascript" src="bootstrap-rs/jquery.easyui.min.js"></script>
</head>
<body>
	<table id="dg" class="easyui-datagrid" title="客户基本信息列表" style="width:900px;height:250px"
			data-options="
			rownumbers:true,
			singleSelect:false,
			fit:true, // 自动适配父容器的宽高
			striped:true,// 行条纹化
			fitColumns:true,
			pagination:true,
			pagePosition:'bottom',
			url:'',
			method:'post'">
		<thead>
			<tr>
				<th data-options="field:'ck',width:40,align:'center'">请选择</th>
				<!--<th data-options="field:'ck',checkbox:true">请选择</th>  -->
				<th data-options="field:'itemid',width:80,align:'center'">手机号码</th>
				<th data-options="field:'productid',width:100,align:'center'"">客户 姓名</th>
				<th data-options="field:'listprice',width:80,align:'center'">品牌</th>
				<th data-options="field:'unitcost',width:80,align:'center'">VIP等级</th>
				<th data-options="field:'attr1',width:220,align:'center'">营业厅</th>
				<th data-options="field:'status',width:80,align:'center'">三个月话费</th>
				<th data-options="field:'manual',width:100,align:'center'">手动分级</th>
				<th data-options="field:'person',width:100,align:'center'">个性资料</th>
			</tr>
		</thead>
		<c:forEach items="${list }" var="customer">
    		<tr>
	            
	            <td><input type="checkbox" name="ck"/><input type="hidden" value="'+docId+'" id="documentId"/></td>
	            <td>${customer.vMobile }</td>
	            <td>${customer.vUsername }</td>
	            <td>${customer.nBrandid }</td>
	            <td>${customer.nGradeid }</td>
	            <td>${customer.vShop }</td>
	            <td>${customer.dOpentime }</td>
	            <td><a href="?id=${customer.vMobile }">手动等级调整</a></td>
	            <td><a href="?id=${customer.vMobile }">添加个性资料</a></td>

	        </tr>
    	</c:forEach>
		
	</table>
	<div id="tb" >
		<div align="center">
			手机号码：<input style="width:150px;height:15px"> 地区：<input
			style="width:150px;height:15px"></br> 三个月话费：<input
			style="width:150px;height:15px">至 <input
			style="width:150px;height:15px"> <input type="button"
			name="querycustlist" value="查询" onclick="">
		</div>
			 </br>
		<div align="left"> 
			<input type="checkbox" id="checkAll" />全选 
			<input type="button" name="exportchoose" value="导出选择用户" onclick="">
			<input type="button" name="exportall" value="导出所有用户" onclick="">
		</div>	
	</div>
</body>
<script type="text/javascript">
$('#dg').datagrid({
	toolbar: '#tb'
});

$("#checkAll").bind("click", function () {
	if($(this).attr("checked") == 'checked'){
		$("[name = 'ck']:checkbox").attr("checked", true);
	} else {
		$("[name = 'ck']:checkbox").attr("checked", false);
	}
});

function selectAll() { 
var all=document.getElementById('checkAll');//获取到点击全选的那个复选框的id 
var one=document.getElementsByName('ck');//获取到复选框的名称 
for(var i=0;i<one.length;i++){ 
one[i].checked=all.checked; //直接赋值
} 
}  
    


</script>
</html>